In Ethernet-type networks, such as a network of switches forwarding information to multiple end hosts, there are implementations to determine a layer 2 topology (e.g., data link layer of the OSI model) without using link discovery protocols like the Cisco Discovery Protocol (CDP), Link Layer Discovery Protocol (LLDP), etc. by leveraging data from the spanning tree protocol (STP data). One example is a method disclosed according to U.S. Patent Publication number US20090285128 A1 Solarwinds.net Inc., which discusses using STP protocol to determine layer 2 topology maps, but does not consider MC-LAG implementations.
The LLDP is formally referred to by the IEEE as Station and Media Access Control Connectivity Discovery specified in standards document IEEE 802.1AB.
The Cisco Discovery Protocol (CDP) is a proprietary Data Link Layer protocol developed by Cisco Systems.
In some cases, layer-2 topology detection is performed using known methods, such as LLDP, Cisco's CDP and various other protocols. However, these techniques are vendor specific in most of the cases. In other cases, the network may not be configured for LLDP, making it difficult to determine the physical layer 2 topology. Embodiments of present application relate to solving this problem and others.
In common layer-2 networks, STP data is transmitted between switches to:    a) Determine loop-free topology for any bridged Ethernet local area network, and    b) To provide automatic backup paths if any active link fails.
To determine loop free paths using STP protocol, the switches use data frames called BPDU (bridge protocol data units) to exchange information about the bridge ID's and root path costs. The information received in BPDU's are stored in STP tables of the switches. The data stored in these tables of each switch can be used to correlate switch to switch links in combination with address forwarding tables.
Ethernet bridges based on their MAC layer addresses learn the interface on which they learn a particular source address and associate that interface with that MAC address. Now when the Ethernet Bridge receives a frame to be sent to an already learnt MAC address, it sends the frame out of that interface. These MAC addresses stored with the interface is referred to as a address forwarding table (AFT) or CAM table.
A MLAG (multi chassis link aggregation group, or MC-LAG) deployment (i.e., a LAG across more than one node) is done where the following are needed:    a) Multi-homing for redundancy;    b) active-active configuration to utilize all links which otherwise may get blocked by spanning tree; and    c) No modification for the LAG partner.
Here, methods include taking a most common implemented solution that the STP runs with a negotiated system- id while the nodes are MLAG active and operational.
As an example scenario, as shown in FIG. 1b, switch 5 is in an MLAG setup where it is connected to switch 4 and switch 3. The port “g” on switch 4 and port “h” on switch 3 use a negotiated system-id to send BPDU's to switch 5 on port “i.”
According to conventional techniques, methods for mapping layer 2 topology will detect that the port g and port h are directly connected as they have the same STP information. It does not consider MC-LAG implementations, in that conventional techniques will not accurately distinguish that switches 3 and 4 are in an MC-LAG configuration, and consequently will not identify that that switches 3 and 4 are two physically distinct switches.
The embodiments of the present disclosure solve this problem by using a combination of address forwarding tables and STP information, thereby arriving with true layer- 2 physical links.